Skip to content

Fix bugs - #1

Merged
chishxd merged 2 commits into
chishxd:mainfrom
no-apologizes:main
Sep 24, 2026
Merged

chishxd merged 2 commits into
chishxd:mainfrom
no-apologizes:main

Conversation

@no-apologizes

Copy link
Copy Markdown
Contributor

Bug #1:

No bounds checking in key length.
scresn

Bug #2

No bound checking for value length and it panics on anything over 1024 bytes.

Bug #3

A crash or power loss during a write leaves an incomplete (torn) record at the end of the file. This caused get() to crash and was fixed by validating each record's value bytes during index rebuild and truncating back to the last valid record so subsequent writes work.

@chishxd chishxd left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful, thanks for the PR! Some dumb mistakes from my side, I could have done better there so you would never have to open PR here... Great job 💖

@chishxd
chishxd merged commit 00cbfbc into chishxd:main Sep 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants